﻿#ifndef CHATWIDGET_H
#define CHATWIDGET_H

#include <QWidget>
#include <QMessageBox>
#include "chatsocket.h"
namespace Ui {
class ChatWidget;
}

class ChatWidget : public QWidget
{
    Q_OBJECT

public:
    explicit ChatWidget(ChatSocket* ct, int uid,int fid,QString uname,QString fname,QString mit = "",QWidget *parent = 0);
    ~ChatWidget();
    void NewMessagePrivate(QJsonObject root);
private slots:
    void on_pushButton_clicked();

private:
    Ui::ChatWidget *ui;
    int user_id; //登录id
    int friend_id;  //好友id
    QString user_name;  //用户名
    QString friendname;   //好友用户名
    QString commit; //好友备注
    ChatSocket *chat_socket; //聊天系统套接字


public slots:

};

#endif // CHATWIDGET_H
